{include file="user.header.html"}
<div id="main" class="clearfix"> {include file="user.menu.html"}
  <div id="right"> {include file="user.curlocal.html"}
    <div class="wrapful">{include file="user.submenu.html"}
      <div class="wrap">
        <div class="public table deposit">
          <div class="deposit-withdraw">
            <!--{if $deposit_account.money gt 0}-->
            <form method="post">
              <div class="title clearfix">
                <h2 class="float-left yahei">可提现余额：<strong>{$deposit_account.money|price_format}</strong>元</h2>
                <!--{if $deposit_account.nodrawal gt 0}-->
                <p class="float-left" style="margin-left: 0;">，不可提现金额：{$deposit_account.nodrawal|price_format}元</p>
                <!--{/if}-->
                <div class="float-right link"> <a class="add-bank" href="{url route='bank/add' type=debit}">添加银行卡</a> <a
                    href="{url route='deposit/drawlist'}">提现记录</a> </div>
              </div>
              <div class="form">
                <dl class="clearfix">
                  <dt>提现到：</dt>
                  <dd>
                    <select name="drawtype">
                      <option value="alipay">支付宝钱包</option>
                      <!-- <option value="wxpay">微信钱包</option> -->
                      <option value="bank">银行卡</option>
                    </select>
                  </dd>
                </dl>
                <dl class="clearfix" ectype="alipay">
                  <dt>支付宝账户：</dt>
                  <dd>
                    <input type="text" name="account" class="text width_normal" placeholder="shopwind@qq.com" />
                    <div class="notice-word mt10">
                      <p class="yellow">支付宝登录账号，邮箱或手机号格式</p>
                    </div>
                  </dd>
                </dl>
                <dl class="clearfix hidden" ectype="bank">
                  <dt>银行卡：</dt>
                  <dd>
                    <!--{if $banks}-->
                    <select name="id">
                      <!--{foreach from=$banks item=item}-->
                      <option value="{$item.id}">{$item.bank}({$item.account})</option>
                      <!--{/foreach}-->
                    </select>
                    <!--{else}-->
                    <div class="notice-word"><p class="yellow">还没设置提现银行卡，<a href="{url route='bank/add'}">点此设置</a></p></div>
                    <!--{/if}-->
                  </dd>
                </dl>
                <dl class="clearfix">
                  <dt>真实姓名：</dt>
                  <dd>
                    <input type="text" name="name" class="text width_normal" />
                    <div class="notice-word mt10">
                      <p class="nobg gray">与该账户一致的真实姓名</p>
                    </div>
                  </dd>
                </dl>
                <dl class="clearfix">
                  <dt>提现金额：</dt>
                  <dd>
                    <input type="text" name="money" class="text width_short" value="100" />
                    元
                  </dd>
                </dl>
                <dl class="clearfix">
                  <dt>&nbsp;</dt>
                  <dd class="submit">
                    <input class="btn-alipay" type="submit" value="下一步" />
                  </dd>
                </dl>
              </div>
            </form>

            <!--{else}-->
            <div class="notice-word">
              <p>您目前账户余额为<span class="f60">0</span>元，不能申请提现。</p>
            </div>
            <!--{/if}-->
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<script type="text/javascript">
  $(function () {
    $('select[name="drawtype"]').change(function(){
      if($(this).val() == 'alipay') {
        $('*[ectype="bank"]').hide();
        $('*[ectype="alipay"]').show();
      } else {
        $('*[ectype="bank"]').show();
        $('*[ectype="alipay"]').hide();
      }
    });
    $('form').submit(function () {
      if ($(this).find('select[name="drawtype"]').val() == 'alipay' && $(this).find('input[name="account"]').val() == '') {
        layer.msg(lang.withdraw_account_empty);
        return false;
      }
      if ($(this).find('input[name="name"]').val() == '') {
        layer.msg(lang.withdraw_name_error);
        return false;
      }
      if ($(this).find('input[name="money"]').val() == '' || $(this).find('input[name="money"]').val() <= 0) {
        layer.msg(lang.withdraw_money_error);
        return false;
      }
      ajax_form('deposit_withdrawconfirm', '提现验证', url(['deposit/withdrawconfirm', $.extend($('form').serializeJson(), { title: '提现验证' })]), '500', '', '0.45');
      return false;
    });
  })
</script>
<iframe id="iframe" name="iframe" src="about:blank" frameborder="0" width="0" height="0" style="display:none"></iframe>
{include file="user.footer.html"}